package imageviewer.domain;

import java.net.URL;

public class Camera  {

	private Long id = null;

	private URL cameraUrl = null;

	private String cameraName = null;

	private String encryptedLogin = null;

	public Camera(URL url, String cameraName, String encryptedLogin) {
		this.cameraUrl = url;
		this.cameraName = cameraName;
		this.encryptedLogin = encryptedLogin;
	}

	public Camera(URL url, String cameraName, Long id) {
		this.cameraName = cameraName;
		this.cameraUrl = url;
		this.id = id;
	}

	public String getCameraName() {
		return cameraName;
	}

	public void setCameraName(String cameraName) {
		this.cameraName = cameraName;
	}

	public URL getCameraUrl() {
		return cameraUrl;
	}

	public void setCameraUrl(URL cameraUrl) {
		this.cameraUrl = cameraUrl;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getEncryptedLogin() {
		return encryptedLogin;
	}

	public void setEncryptedLogin(String encryptedLogin) {
		this.encryptedLogin = encryptedLogin;
	}

	

	@Override
	public boolean equals(Object obj) {
		if (obj == null)
			return false;
		if (!(obj instanceof Camera))
			return false;
		Camera cam = (Camera) obj;
		return this.cameraUrl.toString().equalsIgnoreCase(
				cam.getCameraUrl().toString());
	}
}
